package com.example.mqtt.entity.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(MQTTProperties.PREFIX)
@Data
public class MQTTProperties {
    //指定配置文件application-local.properties中的属性名前缀
    public static final String PREFIX = "publish.mqtt";
    private String host;
    private String client_id;
    private String username;
    private String password;
    private boolean clean_session;
    private int timeout;
    private int keepalive;
    private int connectionTimeout;
    private boolean isAutoConnect;
    private String train_env_stats_topic;
    private String train_env_velocity_topic;
    private String train_data_topic;
    private String train_joints_topic;
}
